/**
 * 
 */
package commons.base.http.client;

import java.io.IOException;

import org.apache.http.impl.client.CloseableHttpClient;

/**
 * @author yuan<cihang.yuan@happyelements.com>
 * @since 1.7
 */
public abstract class AbstractHttpClient {
	
	protected CloseableHttpClient httpClient;
	
	public AbstractHttpClient(HttpClientFactory httpClientFactory){
		this.httpClient = httpClientFactory.createHttpClient(); 
	}
	
	public void shutdown() throws IOException{
		if(httpClient != null){
			httpClient.close();
		}
	}
}
